import request from '@/utils/request'
import {getProcessVariables, readXml} from "@/api/flowable/definition";
import {getNextFlowNode} from "@/api/flowable/todo";
import {flowRecord} from "@/api/flowable/finished";

// 查询已完成的工作票列表
export function listEndedBill(query) {
  return request({
    url: '/flowable/EndedBill/list',
    method: 'get',
    params: query
  })
}



// 查询已完成的工作票详细
export function getEndedBill(workId) {
  return request({
    url: '/flowable/EndedBill/' + workId,
    method: 'get'
  })
}

// 新增已完成的工作票
export function addEndedBill(data) {
  return request({
    url: '/flowable/EndedBill',
    method: 'post',
    data: data
  })
}

// 修改已完成的工作票
export function updateEndedBill(data) {
  return request({
    url: '/flowable/EndedBill',
    method: 'put',
    data: data
  })
}

// 删除已完成的工作票
export function delEndedBill(workId) {
  return request({
    url: '/flowable/EndedBill/' + workId,
    method: 'delete'
  })
}

// 导出已完成的工作票
export function exportEndedBill(data) {
  return request({
    url: '/flowable/EndedBill/export',
    method: 'get',
    data: data
  })
}


// 任务流转记录
export function flowRecordTwo(data) {
  return request({
    url: '/flowable/EndedBill/getTrace',
    method: 'post',
    data: data
  })
}

// 读取xml文件
export function readXml2(data) {
  return request({
    url: '/flowable/EndedBill/readXml/',
    method: 'post',
    data: data
  })
}


// 读取image文件
export function readImage(deployId) {
  return request({
    url: '/flowable/EndedBill/readImage/' + deployId,
    method: 'get'
  })
}





